<%--
  Created by IntelliJ IDEA.
  User: Smile
  Date: 2019/2/20
  Time: 17:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>贡献试题</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link href="resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="resources/css/mobile-css/home.css" />
    <!-- Le styles -->
    <link href="resources/css/mobile-css/bootstrap.css" rel="stylesheet">
    <%--<link href="resources/chart/morris.css" rel="stylesheet">--%>
    <link href="resources/css/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css" />

    <link href="resources/css/mobile-css/mobile-question-add.css" rel="stylesheet">
    <link href="resources/css/mobile-css/mobile-css.css" rel="stylesheet">
    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
        }
    </style>
    <link href="resources/css/mobile-css/bootstrap-responsive.css" rel="stylesheet">
    <link rel="shortcut icon" href="<%=basePath%>resources/images/favicon.ico"/>
</head>
<body>
    <jsp:include page="mobile-header.jsp"/>
    <div class="container">
        <div class="row">
            <div class="col-xs-2">
                <ul class="nav default-sidenav">
                    <li class="active">
                        <a><i class="fa fa-pencil-square-o"></i>贡献试题</a>
                    </li>
                    <li>
                        <a href="student/mobile/mobile-question-list"> <i class="fa fa-bar-chart-o"></i> 试题管理 </a>
                    </li>
                </ul>
            </div>
            <div class="col-xs-6" id="right-content">
                <div class="page-header">
                    <h3><i class="fa fa-pencil-square-o"></i> 贡献试题 </h3>
                </div>
                <div class="page-content">
                    <form id="question-add-form">
                        <div class="form-line question-type" id="question-type">
                            <span class="form-label"><span class="warning-label">*</span>试题类型：</span>
                            <select id="question-type-select" class="df-input-narrow">

                                <option value="1">单选题</option>

                                <option value="2">多选题</option>

                                <option value="3">判断题</option>

                                <option value="4">填空题</option>

                                <option value="5">简答题</option>

                                <option value="6">论述题</option>

                                <option value="7">分析题</option>

                            </select><span class="form-message"></span>
                        </div>
                        <div class="form-line question-knowledge">
                            <span class="form-label"><span class="warning-label">*</span>知识分类：</span>
                            <div>
                                <div class="clearfix">
                                    <div id="aq-course1" style="padding:0px;">
                                        <select id="field-select" class="df-input-narrow" size="4" style="width:100%;">
                                            <c:forEach items="${fieldList }" var="item">
                                                <option value="${item.fieldId }">${item.fieldName }</option>
                                            </c:forEach>
                                        </select>
                                    </div>
                                    <div id="aq-course2" style="padding:0px;">
                                        <select id="point-from-select" class="df-input-narrow" size="4"  style="width:100%;">
                                        </select>
                                    </div>
                                </div>

                                <div style="text-align:center;margin:10px 0;">
                                    <button id="add-point-btn" style="margin-top: 5px;" class="btn btn-primary btn-xs">选择知识分类</button>
                                    <button id="del-point-btn" style="margin-top: 5px;" class="btn btn-danger btn-xs">删除知识分类</button>
                                    <button id="remove-all-point-btn" style="margin-top: 5px;" class="btn btn-warning btn-xs">清除列表</button>
                                </div>
                                <div  id="kn-selected" style="padding-left:0px;text-align:center;margin-bottom:20px;">
                                    <select id="point-to-select" class="df-input-narrow" size="4"  style="width:100%;">
                                    </select>
                                    <p style="font-size:12px;color:#AAA;">您可以从上面选择4个知识分类</p>
                                </div>
                            </div>
                            <span class="form-message"></span>
                        </div>

                        <div class="form-line question-content">
                            <span class="form-label"><span class="warning-label">*</span>试题内容：</span>
                            <textarea class="add-question-ta" onblur="validParam()"></textarea>
                            <span class="add-img add-content-img" style="width:100px;">添加图片</span>
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line form-question-opt" style="display: block;">
                            <span class="form-label"><span class="warning-label">*</span>选项：</span>
                            <div class="add-opt-items">
										<span class="add-opt-item"><label class="que-opt-no">A</label>
											<input type="text" class="df-input-narrow form-question-opt-item">
											<span class="add-img add-opt-img">添加图片</span>
										</span>
                                <span class="add-opt-item"><label class="que-opt-no">B</label>
											<input type="text" class="df-input-narrow form-question-opt-item">
											<span class="add-img add-opt-img">添加图片</span>
										</span>
                                <span class="add-opt-item"><label class="que-opt-no">C</label>
											<input type="text" class="df-input-narrow form-question-opt-item">
											<span class="add-img add-opt-img">添加图片</span> <span><i class="small-icon ques-remove-opt fa fa-minus-square" title="删除此选项"></i></span>
										</span>
                                <span class="add-opt-item"><label class="que-opt-no">D</label>
											<input type="text" class="df-input-narrow form-question-opt-item">
											<span class="add-img add-opt-img">添加图片</span> <span><i class="small-icon ques-remove-opt fa fa-minus-square" title="删除此选项"></i></span>
										</span>
                            </div>

                            <span id="ques-add-opt"><i class="small-icon fa fa-plus-square" title="添加选项"></i></span>
                            <br>
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line form-question-answer1 correct-answer" style="display: block;">
                            <span class="form-label"><span class="warning-label">*</span>正确答案：</span>
                            <select class="df-input-narrow">
                                <option value="A">A</option><option value="B">B</option><option value="C">C</option><option value="D">D</option>
                            </select><span class="form-message"></span>
                        </div>
                        <div class="form-line form-question-answer-muti correct-answer" style="display: none;">
                            <span class="form-label"><span class="warning-label">*</span>正确答案：</span>

                            <span class="muti-opt-item">
										<input type="checkbox" value="A">
										<label class="que-opt-no">A</label>
										<br>
									</span>
                            <span class="muti-opt-item">
										<input type="checkbox" value="B">
										<label class="que-opt-no">B</label>
										<br>
									</span>
                            <span class="muti-opt-item">
										<input type="checkbox" value="C">
										<label class="que-opt-no">C</label>
										<br>
									</span>
                            <span class="muti-opt-item">
										<input type="checkbox" value="D">
										<label class="que-opt-no">D</label>
										<br>
									</span>
                            <span class="form-message"></span>
                        </div>
                        <div class="form-line form-question-answer-boolean correct-answer" style="display: none;">
                            <span class="form-label"><span class="warning-label">*</span>正确答案：</span>
                            <select class="df-input-narrow">
                                <option value="T">正确</option>
                                <option value="F">错误</option>
                            </select><span class="form-message"></span>
                        </div>
                        <div class="form-line correct-answer form-question-answer-text" style="display: none;">
                            <span class="form-label form-question-answer-more"><span class="warning-label">*</span>参考答案：</span>
                            <textarea class="add-question-ta" onblur="validParam()"></textarea>									<span class="form-message"></span>
                            <br>

                        </div>

                        <div class="form-line difficulty-type" style="display: block;">
                            <span class="form-label"><span class="warning-label"></span>难度系数：</span>
                            <select id="difficulty-from-select" class="df-input-narrow">
                                <option value="1" >一星</option>
                                <option value="2" >二星</option>
                                <option value="3" >三星</option>
                                <option value="4" >四星</option>
                                <option value="5" >五星</option>
                            </select>
                        </div>
                        <div class="form-line form-question-points" style="display: block;">
                            <span class="form-label"><span class="warning-label"></span>分值：</span>
                            <input type="text" class="df-input-narrow" onblur="validParam()"><span class="form-message"></span>
                            <br>
                        </div>
                        <div class="form-line form-question-reference" style="display: block;">
                            <span class="form-label"><span class="warning-label">*</span>来源：</span>
                            <input type="text" class="df-input-narrow" onblur="validParam()"><span class="form-message"></span>
                            <br>
                        </div>
                        <div class="form-line form-question-examingpoint" style="display: block;">
                            <span class="form-label"><span class="warning-label">*</span>知识点：</span>
                            <input type="text" class="df-input-narrow" onblur="validParam()"><span class="form-message"></span>
                            <br>
                        </div>
                        <div class="form-line form-question-keyword" style="display: block;">
                            <span class="form-label"><span class="warning-label">*</span>关键字：</span>
                            <input type="text" class="df-input-narrow" onblur="validParam()"><span class="form-message"></span>
                            <br>
                        </div>
                        <div class="form-line form-question-analysis" style="display: block;">
                            <span class="form-label"><span class="warning-label">*</span>题目解析：</span>
                            <textarea class="add-question-ta" onblur="validParam()"></textarea><span class="form-message"></span>
                            <br>

                        </div>

                        <div class="form-line">
                            <input id="btn-save" value="保存" type="submit" class="df-submit btn btn-info">
                        </div>
                        <input type="hidden" value="mobile" id="mobile">
                    </form>

                </div>
                <div class="modal fade" aria-hidden="true" style="display: none;">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                <h4 class="modal-title">图片上传工具</h4>
                            </div>
                            <div class="modal-body">
                                <div id="add-question-img-dialog" title="图片上传工具">
                                    <form>
                                        <div class="form-line img-destination">
                                            <span class="form-label">添加至：</span>
                                            <label></label>
                                            <input type="hidden" value=""/>
                                        </div>
                                        <div class="form-line add-update-quetstionfile">
                                            <span class="form-label">上传图片：</span>
                                            <div id="div-file-list">
                                            </div>
                                            <div class="form-line" id="uploadify"></div>
                                            <span class="form-message">请上传png、jpg、gif图片文件，且不能大于100KB。为了使得图片显示正常，请上传的图片长宽比例为2:1</span>
                                        </div>
                                    </form>
                                </div>
                            </div>

                        </div>
                        <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                </div>
            </div>
        </div>
        <hr>
        <jsp:include page="footer.jsp"/>
    </div>
    <script type="text/javascript" src="resources/js/jquery/jquery-1.9.0.min.js"></script>
    <script type="text/javascript" src="resources/js/all.js"></script>
    <script type="text/javascript" src="resources/js/jquery/jquery-ui-1.9.2.custom.min.js"></script>

    <script type="text/javascript" src="resources/js/uploadifive/jquery.uploadifive.js"></script>
    <script type="text/javascript" src="resources/js/question-upload-img.js"></script>
    <script type="text/javascript" src="resources/js/field-2-point.js"></script>
    <script type="text/javascript" src="resources/js/mobile-question-add.js"></script>

    <!-- Bootstrap JS -->
    <script type="text/javascript" src="resources/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
